﻿@model ProFileTypeViewModel
@{
    Layout = null;
    ViewBag.Title = "工程项目修改";
}
<style type="text/css">
    .file_type_table input, textarea {
        width: 300px !important;
    }
</style>
<script src="/Scripts/jQuery/jquery.validate.min.js" type="text/javascript"></script>
<script src="/Scripts/jQuery/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
@{Html.EnableClientValidation();}
@using (Html.BeginForm("EditPost", "ProFileType", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,refre_jgzl_cllx_index);", @class = "pageForm required-validate" }))
{
    <div class="pageFormContent sortDrag" layouth="60">
        @{string hide = "";
          if (Model.TheBcdProfiletypeInfo.P_ID == 0)
          {
              hide = "display:none;";
            <span>请先选择项目</span>
          }
        }
        <table class="tab01 tabNo file_type_table" width="95%;" style="@(hide)">
            @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Pft_ID, new { @type = "hidden" })
            @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Pft_PID, new { @type = "hidden" })
            @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Pft_PIds, new { @type = "hidden" })
            @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.P_ID, new { @type = "hidden" })
            <tr>
                <td class="td1" style="width: 25%;">项目名称：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdProfiletypeInfo.P_Name, new { cols = "3", @class = "input05" })
                    @Html.ValidationMessageFor(model => model.TheBcdProfiletypeInfo.P_Name)
                </td>
            </tr>
            <tr>
                <td class="td1" style="width: 25%;">项目编号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.P_Code, new { @class = "input02" })
                    @Html.ValidationMessageFor(model => model.TheBcdProfiletypeInfo.P_Code)
                </td>
            </tr>
            <tr>
                <td class="td1" style="width: 25%;">材料类型：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_ID, new { @type = "hidden" })
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Name)
                </td>
            </tr>
            <tr>
                <td class="td1">编制单位类型：</td>
                <td>
                    @{string acValue = "";}
                    @{switch (Model.TheBcdProfiletypeInfo.Fd_UType)
                      {
                          case "施工单位": acValue = "GetSegmentJson"; break;
                          case "监理单位": acValue = "GetSupervJson"; break;
                          default: acValue = "GetAllSegmentJson"; break;
                      }}
                    <input id="input_action" type="hidden" value="@acValue" />
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_UType, new { @class = "input02", @readonly = "readonly" })
                </td>
            </tr>
            @{string secStyle = "";}
            @{if (Model.TheBcdProfiletypeInfo.Fd_UType == "项目法人" || Model.TheBcdProfiletypeInfo.Fd_UType == "设计单位" || Model.TheBcdProfiletypeInfo.Fd_UType == "相关单位")
              { secStyle = "display: none;"; }}
            <tr id="tr_fssction" style="@secStyle">
                <td class="td1">标段：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Pft_Section, new { @class = "input02", @readonly = "readonly" })
                    @*<a id="a_file_unit" class="btnLook" title="选择标段" href="/CompletionMaterials/ProFileType/SectionUnit"
                        mask="true" width="480" height="480" lookupgroup="district"></a>*@
                </td>
            </tr>
            <tr>
                <td class="td1">编制单位：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdProfiletypeInfo.Pft_Unit, new { cols = "3", @class = "input05" })
                    @Html.ValidationMessageFor(model => model.TheBcdProfiletypeInfo.Pft_Unit)
                </td>
            </tr>
            <tr>
                <td class="td1">档案号：</td>
                <td>
                    <input type="hidden" id="input_code" value="@(Model.TheBcdProfiletypeInfo.Fd_Code)" />
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Code)
                </td>
            </tr>
            <tr>
                <td class="td1">序号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Numb)
                </td>
            </tr>
            <tr>
                <td class="td1">排序：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Order)
                </td>
            </tr>
            <tr>
                <td class="td1">保管期限：</td>
                <td>
                    @Html.DropDownListFor(model => model.TheBcdProfiletypeInfo.Fd_Kept, ViewBag.keptlist as IEnumerable<SelectListItem>, new { @style = "width: 306px !important;" })
                </td>
            </tr>
            <tr>
                <td class="td1">编制套数：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Kit)
                    @Html.ValidationMessageFor(model => model.TheBcdProfiletypeInfo.Fd_Kit)
                </td>
            </tr>
            <tr>
                <td class="td1">表格号：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Table)
                </td>
            </tr>
            <tr>
                <td class="td1">是否重要：</td>
                <td>
                    @Html.DropDownListFor(model => model.TheBcdProfiletypeInfo.Fd_Important, ViewBag.implist as IEnumerable<SelectListItem>, new { @style = "width: 306px !important;" })
                </td>
            </tr>
            <tr>
                <td class="td1">负责人：</td>
                <td>
                    @Html.TextBoxFor(model => model.TheBcdProfiletypeInfo.Fd_Duty)
                </td>
            </tr>
            <tr>
                <td class="td1">备注：</td>
                <td>
                    @Html.TextAreaFor(model => model.TheBcdProfiletypeInfo.Fd_Remark, new { @style = "height: 45px;line-height: 15px;" })
                </td>
            </tr>
        </table>
    </div>

    <div class="formBar">
        <ul>

            <li>
                <button type="submit" class="btn btn-sm">保存</button>
            </li>
            <li>
                <button type="button" class="close btn btn-default btn-sm">取消</button>
            </li>

        </ul>
    </div>
}
